:root {
  --bg: #0b1220;
  --bg-soft: #0f172a;
  --card: #0b1220;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --primary: #60a5fa;
  --primary-600: #3b82f6;
  --accent: #22d3ee;
  --danger: #f87171;
  --ring: 0 0 0 2px rgba(96,165,250,0.55), 0 0 30px rgba(34,211,238,0.25);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(1200px 800px at 70% -20%, rgba(34,211,238,0.12), transparent),
              radial-gradient(1000px 700px at -20% 20%, rgba(59,130,246,0.15), transparent),
              var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-tap-highlight-color: transparent;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom) 16px;
}

.app__header {
  text-align: center;
  margin-top: 12px;
  margin-bottom: 12px;
}

.app__title {
  font-family: Orbitron, Inter, system-ui, sans-serif;
  letter-spacing: 0.04em;
  font-weight: 700;
  font-size: clamp(22px, 5vw, 32px);
  margin: 8px 0 4px 0;
  background: linear-gradient(90deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.app__subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 12px 0;
}

.controls {
  width: 100%;
  display: flex;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 8px 0 12px 0;
  backdrop-filter: blur(8px);
}

.button {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #0b1220;
  background: linear-gradient(180deg, var(--primary), var(--primary-600));
  box-shadow: 0 6px 18px rgba(59,130,246,0.35), inset 0 0 0 1px rgba(255,255,255,0.2);
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.button:active {
  transform: translateY(1px) scale(0.99);
  filter: brightness(0.96);
}

.button--primary:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.board__wrapper {
  width: 100%;
  max-width: 520px;
  padding: 8px 6px 24px 6px;
}

.board {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
}

.cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(30,41,59,0.9), rgba(15,23,42,0.9));
  border: 1px solid rgba(148,163,184,0.1);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: clamp(14px, 3.6vw, 18px);
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.25s ease;
}

.cell:hover {
  transform: translateY(-1px);
}

.cell:active {
  transform: translateY(0);
}

.cell--hidden {
  opacity: 0.1;
  pointer-events: none;
}

.cell--hit {
  background: linear-gradient(180deg, rgba(34,197,94,0.35), rgba(21,128,61,0.35));
  border-color: rgba(34,197,94,0.6);
  animation: pulse 0.9s ease 1;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.0); }
  30% { box-shadow: 0 0 0 16px rgba(34,197,94,0.15); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.0); }
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(600px 400px at 50% 50%, rgba(34,197,94,0.1), transparent), rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.overlay[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.overlay__content {
  text-align: center;
  padding: 18px 20px;
  background: rgba(2,6,23,0.65);
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
}

.overlay__text {
  font-family: Orbitron, Inter, system-ui, sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.overlay__hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

@media (hover: none) {
  .cell:hover { transform: none; }
}


